<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<!--[if IE]>
<style type="text/css">
.input{behavior: url($!webPath/resources/style/common/css/ie-css3.htc);}
</style>
<![endif]-->
<link href="$!webPath/resources/style/system/manage/$!{config.websiteCss}/template.css"  rel="stylesheet" type="text/css"/>
<script src="$!webPath/resources/js/jquery-1.8.3.min.js"></script>
<script src="$!webPath/resources/js/jquery.shop.common.js"></script>
<script src="$!webPath/resources/js/jquery.poshytip.min.js"></script>
<script>
//
function ajax_update(id,fieldName,obj,value){
   var val;
   if(value==undefined){
	 val=jQuery(obj).val();
   }else val=value; 
   jQuery.ajax({type:'POST',
	              url:'$!webPath/admin/goods_ajax.htm',
				  data:{"id":id,"fieldName":fieldName,"value":val},
				beforeSend:function(){
				  
				},
			   success:function(data){
	             if(val==""){
				   jQuery(obj).attr("src","$!webPath/resources/style/system/manage/blue/images/"+data+".png");
				 }else{
				   jQuery(obj).val(val);
				 }    
				 if(value!=undefined){
				   jQuery(obj.parentNode.parentNode).remove();
				 }
              }
	    });
}
</script>
</head>
<body>
<div class="cont">
  <h1 class="seth1">商品管理</h1>
  <div class="settab"> 
	<span class="tab-one"></span> <span class="tabs"> 
	<a href="$!webPath/admin/goods_list.htm">所有商品</a> |<a href="$!webPath/admin/goods_outline.htm" class="this">违规下架商品</a></span> 
	<span class="tab-two"></span>	</div>
	<form name="queryForm" id="queryForm" action="" method="post">
    <div class="allmem_search">
      <ul>
        <li> <span>商品名称</span> <span class="allmen size4">
          <input name="q_goods_name" type="text" id="q_goods_name" />
          </span> <span>品牌名称</span> 
          <select name="q_goods.goods_brand.id" id="q_goods.goods_brand.id">
          <option value="">所有品牌</option>
          #foreach($gb in $gbs)
          <option value="$!gb.id">$!gb.name</option>
          #end
          </select>
          <span>类别</span>
          <select name="q_goods.gc.id" id="q_goods.gc.id">
            <option value="">所有分类</option>
           #genericTree($!gcs)
          </select>
          <span class="btn_search">
          <input name="" type="submit"  value="搜索" style="cursor:pointer;"/>
          </span> </li>
      </ul>
    </div>
  </form>
  <div class="operation">
    <h3>友情提示</h3>
    <ul>
      <li>上架商品，在商城前台所有访客均可查看，管理员和卖家都可以设置商品上架状态</li>
      <li>违规商品，管理员根据商城访客举报结合实际情况设定违规，违规商品前台不可显示，只能管理员能取消违规</li>
    </ul>
  </div>
  <form name="ListForm" id="ListForm" action="" method="post">
    <div class="brandtable">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="brand_table">
        <tr style="background: #if($!config.websiteCss=='blue') #2A7AD2 #end 
      #if($!config.websiteCss=='black')#333 #end; height:30px; color:#FFF">
          <td width="45">&nbsp;</td>
          <td width="279">商品名称
           </td>
          <td width="144">品牌</td>
          <td width="171">分类名</td>
          <td width="119" align="center">上架</td>
          <td width="94" align="center">查看次数</td>
          <td width="117" align="center">操作</td>
        </tr>
      #foreach($obj in $objs)
        <tr>
          <td align="center"><input name="checkbox" type="checkbox" id="checkbox" value="$!obj.id" /></td>
          <td><label>
            <textarea name="textarea" cols="40" rows="3"  title="可编辑" onblur="ajax_update('$!obj.id','goods_name',this)">$!obj.goods_name</textarea>
          </label></td>
          <td>$!obj.goods_brand.name</td>
          <td>$!obj.gc.className</td>
          <td align="center"><img onclick="ajax_update('$!obj.id','goods_status',this,'0')"  src="$!webPath/resources/style/system/manage/blue/images/tops.jpg"  border="0" style="cursor:pointer;" title="可编辑"/> </td>
          <td align="center">$!obj.goods_click</td>
          <td class="ac8" align="center"><a href="$!webPath/goods.htm?id=$!obj.id" target="_blank">查看</a></td>
        </tr>
     #end
		<tr>
        <td align="center"><input type="checkbox" name="all" id="all" value="" onclick="selectAll(this)"/>
          <input name="mulitId" type="hidden" id="mulitId" />        </td>
        <td colspan="2" class="bdel">
		<span class="sp1">全部</span><span class="sp2">
          <div class="shop_btn_del shopbtn">
            <input name="" type="button" value="删除" onclick="cmd('$!webPath/admin/goods_del.htm');"/>
          </div>
          </span>		  </td>
        <td colspan="4"></td>
      </tr>
    </table>
	  <div class="fenye" align="right">
      
	   <input name="currentPage" type="hidden" id="currentPage" value="$!currentPage" />
      $!gotoPageFormHTML </div>
    </div>
  </form>
</div>
</body>
</html>
